package movee.io.dunet;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class DunetMsg<T> extends DunetMsgHeader {

    @SerializedName(value = "message", alternate = "msg")
    private Message<T> message;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Message<U> {

        @SerializedName("total_count")
        private Integer totalCount;

        private List<U> data;
    }


}
